<template>
    <div class="withdraw">
      <div class="header">
        <div class="back" @click="handleBack">
          <van-icon name="arrow-left" class="back-arrow" />
        </div>
        <div class="title">提币申请</div>
        <div class="record" @click="handleRecordClick">提币记录</div>
      </div>
      <div class="currency-list">
        <div class="currency-item" @click="handleCurrencyClick('INR')">
          <div class="currency-info">
            <div class="currency-icon">
              <img src="https://coinlist000.s3.ap-east-1.amazonaws.com/INR.png" alt="INR" />
            </div>
            <span class="currency-name">INR</span>
          </div>
          <van-icon name="arrow" class="arrow-right" />
        </div>
      </div>
    </div>
  </template>
  
  <script setup name="Withdraw">
  import { ref } from 'vue';
  import { Icon as VanIcon } from 'vant';
  
  import { useRouter } from "vue-router";
  const router = useRouter();
  const handleBack = () => {
    router.go(-1); // Go back to the previous page
  };
  
  const handleRecordClick = () => {
    router.push('/withdrawRecord'); // Navigate to the withdraw record page
  };
  
  const handleCurrencyClick = (currency) => {
   router.push("/withdrawInr")
  };
  </script>
  
  <style scoped>
  .withdraw {
    height: 100vh;
    background: #121212;
    padding-bottom: 60px;
    box-sizing: border-box;
  }
  
  .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #1e1e1e;
    position: relative;
    box-shadow: 0 2px 4px #0003;
  }
  
  .back {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .back-arrow {
    width: 8px;
    height: 8px;
    border-top: 2px solid #e0e0e0;
    border-left: 2px solid #e0e0e0;
    transform: rotate(-45deg);
  }
  .title {
    font-size: 18px;
    color: #fff;
    font-weight: 500;
    position: absolute;
    left: 50%;
    transform: translate(-50%);
  }
  
  .record {
    font-size: 14px;
    color: #b0b0b0;
  }
  
  .currency-list {
    margin-top: 12px;
    background: #1e1e1e;
  }
  
  .currency-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    cursor: pointer;
  }
  
  .currency-info {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .currency-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    filter: brightness(1.2);
  }
  
  .currency-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  
  .currency-name {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
  }
  
  .arrow-right {
    width: 8px;
    height: 8px;
    border-top: 2px solid #b0b0b0;
    border-right: 2px solid #b0b0b0;
    transform: rotate(45deg);
  }
  </style>